package com.haixiaoke.saas.bill.service;

import com.haixiaoke.saas.bill.domain.HouseBill;
import com.haixiaoke.saas.common.weChat.domain.ParseParam;
import com.haixiaoke.saas.contract.domain.LesseeContract;

import java.util.List;
import java.util.Map;

/**
 * 入住账单Service接口
 *
 * @author qixi
 * @date 2024-05-30
 */
public interface IHouseBillService {
    /**
     * 查询入住账单
     *
     * @param billId 入住账单主键
     * @return 入住账单
     */
    HouseBill selectHouseBillByBillId(String billId);

    /**
     * 查询入住账单列表
     *
     * @param houseBill 入住账单
     * @return 入住账单集合
     */
    List<HouseBill> selectHouseBillList(HouseBill houseBill);

    /**
     * 新增入住账单
     *
     * @param houseBill 入住账单
     * @return 结果
     */
    int insertHouseBill(HouseBill houseBill);

    /**
     * 修改入住账单
     *
     * @param houseBill 入住账单
     * @return 结果
     */
    int updateHouseBill(HouseBill houseBill);

    /**
     * 批量删除入住账单
     *
     * @param billIds 需要删除的入住账单主键集合
     * @return 结果
     */
    int deleteHouseBillByBillIds(String[] billIds);

    /**
     * 删除入住账单信息
     *
     * @param billId 入住账单主键
     * @return 结果
     */
    int deleteHouseBillByBillId(String billId);

    int createHouseBill(HouseBill houseBill);

    void houseBillActivationTask();

    List<HouseBill> selectInvalidHouseBillList(HouseBill houseBill);


    int disassembleHouseBill(HouseBill houseBill);

    /**
     * 线下支付
     */
    int offlinePayment(HouseBill houseBill);

    List<HouseBill> calculate(LesseeContract lesseeContract);


    List<HouseBill> selectHouseBillByOrderId(String orderId);

    /**
     * 批量新增账单
     *
     * @param list
     * @return
     */
    int batchInsert(List<HouseBill> list);

    /**
     * 更新账单启用状态
     *
     * @param lesseeContractId
     * @param value
     * @return
     */
    int updateBillEnableStates(String lesseeContractId, String value);

    /**
     * 违约金账单任务
     */
    void penaltyBillTask();

    void payCallbackBill(ParseParam parseParam);

    void yiMaPyCallbackBill(Map<String, Object> houseBill);


    void houseBillOvertimeTask();

    List<HouseBill> selectHouseBillListByLesseeContractId(String lesseeContractId);

    List<HouseBill> selectHouseBillByHouseIds(String[] houseIds);

    int selectOutstandingByOrderId(String orderId);
}
